package com.iafme.dto.res;

import cn.zhxu.bs.bean.DbField;
import cn.zhxu.bs.bean.SearchBean;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.iafme.dto.res.common.CommonFieldResDTO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * @author summer
 * @version 1.0
 * @date 2025/2/23 21:19
 */
@EqualsAndHashCode(callSuper = true)
@Data
@SearchBean(tables = "iafme_news n",orderBy = "n.createTime DESC")
public class NewsResDTO extends CommonFieldResDTO implements Serializable {

    @DbField("n.name")
    private String name;

    @DbField("n.context")
    private String context;

    @DbField("n.image")
    private String image;

    @DbField("n.createTime")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date pushDate;

    @DbField("n.intro")
    private String intro;
}
